package com.videri.match.server;

import com.videri.match.client.Matching;

public class Head2HeadGame {
	private int gameNum;
	private int playerOneNum;
	private int playerTwoNum;
	private boolean isWon;
	private Matching myMatching;
	
	public Head2HeadGame(int num, int one, int two, Matching m){
		gameNum = num;
		playerOneNum = one;
		playerTwoNum = two;
		isWon = false;
		myMatching = m;
	}
	
	public int getOtherPlayer(int num){
		if(num==playerOneNum)
			return playerTwoNum;
		if(num==playerTwoNum)
			return playerOneNum;
		return -1;
	}
	
	public int getGameNum(){
		return gameNum;
	}
	
	public void setWon(){
		isWon = true;
	}
	
	public boolean gameWon(){
		return isWon;
	}
	
	public Matching getMatching(){
		return myMatching;
	}
}
